import axios from '../utils/request.js'
import qs from 'qs'//引入qs

export function save(user) {
  return axios.post('/sys/user/save',user);
}

export function deleteById(id) {
  return axios.delete('/sys/user/'+id);
}

export function resetPassword(id) {
  return axios.post('/sys/user/password/reset/'+id);
}

export function updatePassword(password) {
  return axios.post('/sys/user/password/update',password);
}


export function enableSave(user) {
  return axios.post('/sys/user/enable/save',user);
}

export function findById(id) {	
	return axios.get('/sys/user/' + id);
}

export function list(params) {	
	return axios.get('/sys/user/list?' + qs.stringify(params));
}

export function nameList(params) {	
	return axios.get('/sys/user/name/list?' + qs.stringify(params),{'closeLoading':false});
}
